﻿namespace vsXPathSDK
{
    public abstract class FileFilterPlugin: IPlugin
    {

        #region IPlugin Members

        public abstract string Name
        {
            get;
        }

        public abstract string SupportURL
        {
            get;
        }

        public abstract int PluginVersion
        {
            get;
        }

        public PluginType Type
        {
            get { return PluginType.FileFilter;  }
        }

        #endregion

        /// <summary>
        /// A function called when file is about to be opened. If it return false file will not be opened.
        /// </summary>
        /// <param name="file">Path of file to be opened</param>
        /// <returns></returns>
        public abstract bool ProcessFile(string file);
        /// <summary>
        /// A function to validate the file, such as file format. It it return false file will not be openeded. This function is called before the ProcessFile, which may do not explicitly validate file. This function can help in shorting the process file.
        /// </summary>
        /// <param name="file">Path of file to be opened.</param>
        /// <returns></returns>
        public abstract bool ValidateFile(string file);
    }
}